﻿using System;
using System.Collections.Generic;
using Module.Core.Member;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Data;

namespace Web.Test.ConTrols
{
    public partial class AddPoint : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            TreeMemBer tree = new TreeMemBer();
            DataTable dt = null;
            dt = tree.getListMemBer();
        }
        protected void clear()
        {
            txtMa.Text = "";
            txtGold.Text = "";
            txtDealXu.Text = "";
        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            TreeMemBer tree = new TreeMemBer();
            try
            {
                Double gold = Double.Parse(txtGold.Text.Trim());
                Int32 dealXu = 0;
                if (txtDealXu.Text != "")
                    dealXu = Int32.Parse(txtDealXu.Text);
                tree.addGold(txtMa.Text.Trim(), gold, dealXu, txtDate.Text.Trim());
                txtMa.Text = "";
                txtGold.Text = "";
                txtDealXu.Text = "";
                txtDate.Text = "";
            }
            catch (Exception ee)
            {
                lblMessess.Text = "Nhập đúng kiểu Điểm và level";
            }
        }
    }
}